home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_i.lzh / intuition / screens.i < prev    next >
Text File  |  1991-03-14  |  12KB  |  346 lines

  1.     IFND  INTUITION_SCREENS_I
  2. INTUITION_SCREENS_I    SET  1
  3. **
  4. **    $Filename: intuition/screens.i $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.17 $
  7. **    $Date: 91/02/13 $
  8. **
  9. **    The Screen and NewScreen structures and attributes
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.     IFND EXEC_TYPES_I
  15.     INCLUDE "exec/types.i"
  16.     ENDC
  17.  
  18.     IFND GRAPHICS_GFX_I
  19.     INCLUDE "graphics/gfx.i"
  20.     ENDC
  21.  
  22.     IFND GRAPHICS_CLIP_I
  23.     INCLUDE "graphics/clip.i"
  24.     ENDC
  25.  
  26.     IFND GRAPHICS_VIEW_I
  27.     INCLUDE "graphics/view.i"
  28.     ENDC
  29.  
  30.     IFND GRAPHICS_RASTPORT_I
  31.     INCLUDE "graphics/rastport.i"
  32.     ENDC
  33.  
  34.     IFND GRAPHICS_LAYERS_I
  35.     INCLUDE "graphics/layers.i"
  36.     ENDC
  37.  
  38.     IFND UTILITY_TAGITEM_I
  39.     INCLUDE "utility/tagitem.i"
  40.     ENDC
  41.  
  42. *
  43. * NOTE:  intuition/iobsolete.i is included at the END of this file!
  44. *
  45.  
  46. ; ========================================================================
  47. ; === DrawInfo =========================================================
  48. ; ========================================================================
  49.  
  50. * This is a packet of information for graphics rendering.  It originates
  51. * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  52.  
  53. * If you find dri_Version >= DRI_VERSION, you know this structure
  54. * has at least the fields defined in this version of the include file
  55.  
  56. DRI_VERSION    EQU    1
  57.  
  58.  STRUCTURE DrawInfo,0
  59.     UWORD    dri_Version     ; will be  DRI_VERSION
  60.     UWORD    dri_NumPens     ; guaranteed to be >= NUMDRIPENS
  61.     APTR    dri_Pens     ; pointer to pen array
  62.     APTR    dri_Font     ; screen default font
  63.     UWORD    dri_Depth     ; (initial) depth of screen bitmap
  64.     ; from DisplayInfo database for initial display mode
  65.     UWORD    dri_ResolutionX
  66.     UWORD    dri_ResolutionY
  67.     ULONG    dri_Flags
  68.    STRUCT    dri_longreserved,28
  69.  
  70. DRIF_NEWLOOK    EQU    $00000001 ; specified SA_Pens, full treatment
  71. DRIB_NEWLOOK    EQU    0
  72.  
  73.     ; rendering pen number indexes into DrawInfo.dri_Pens[]
  74.     ENUM
  75.     EITEM    DETAILPEN    ; compatible Intuition rendering pens
  76.     EITEM    BLOCKPEN,
  77.     EITEM    TEXTPEN        ; text on background (pen = 0)
  78.     EITEM    SHINEPEN    ; bright edge on bas-relief
  79.     EITEM    SHADOWPEN    ; dark edge
  80.     EITEM    FILLPEN        ; active window fill
  81.     EITEM    FILLTEXTPEN    ; text over FILLPEN
  82.     EITEM    BACKGROUNDPEN    ; always color 0
  83.     EITEM    HIGHLIGHTTEXTPEN  ; highlighted text, against BACKGROUNDPEN
  84.     EITEM    NUMDRIPENS
  85.  
  86.  
  87. ; ========================================================================
  88. ; === Screen =============================================================
  89. ; ========================================================================
  90.  STRUCTURE Screen,0
  91.  
  92.     APTR sc_NextScreen        ; linked list of screens
  93.     APTR sc_FirstWindow        ; linked list Screen's Windows
  94.  
  95.     WORD sc_LeftEdge        ; parameters of the screen
  96.     WORD sc_TopEdge        ; parameters of the screen
  97.  
  98.     WORD sc_Width        ; null-terminated Title text
  99.     WORD sc_Height        ; for Windows without ScreenTitle
  100.  
  101.     WORD sc_MouseY        ; position relative to upper-left
  102.     WORD sc_MouseX        ; position relative to upper-left
  103.  
  104.     WORD sc_Flags        ; see definitions below
  105.  
  106.     APTR sc_Title
  107.     APTR sc_DefaultTitle
  108.  
  109.     ; Bar sizes for this Screen and all Window's in this Screen
  110.     BYTE sc_BarHeight
  111.     BYTE sc_BarVBorder
  112.     BYTE sc_BarHBorder
  113.     BYTE sc_MenuVBorder
  114.     BYTE sc_MenuHBorder
  115.     BYTE sc_WBorTop
  116.     BYTE sc_WBorLeft
  117.     BYTE sc_WBorRight
  118.     BYTE sc_WBorBottom
  119.  
  120.     BYTE sc_KludgeFill00    ; This is strictly for word-alignment
  121.  
  122.     ; the display data structures for this Screen
  123.     APTR sc_Font            ; this screen's default font
  124.     STRUCT sc_ViewPort,vp_SIZEOF    ; describing the Screen's display
  125.     STRUCT sc_RastPort,rp_SIZEOF    ; describing Screen rendering
  126.     STRUCT sc_BitMap,bm_SIZEOF        ; auxiliary graphexcess baggage
  127.     STRUCT sc_LayerInfo,li_SIZEOF    ; each screen gets a LayerInfo
  128.  
  129.     APTR sc_FirstGadget
  130.  
  131.     BYTE sc_DetailPen        ; for bar/border/gadget rendering
  132.     BYTE sc_BlockPen        ; for bar/border/gadget rendering
  133.  
  134.     ; the following variable(s) are maintained by Intuition to support the
  135.     ; DisplayBeep() color flashing technique
  136.     WORD sc_SaveColor0
  137.  
  138.     ; This layer is for the Screen and Menu bars
  139.     APTR sc_BarLayer        ; was "BarLayer"
  140.  
  141.     APTR sc_ExtData
  142.  
  143.     APTR sc_UserData        ; general-purpose pointer to User data
  144.  
  145.     LABEL sc_SIZEOF    ; actually, you have no business talking about
  146.             ; or relying on the size of a screen structure
  147.  
  148.  
  149. ; --- FLAGS SET BY INTUITION -------------------------------------------------
  150. ; The SCREENTYPE bits are reserved for describing various Screen types
  151. ; available under Intuition.
  152. SCREENTYPE    EQU    $000F    ; all the screens types available
  153. ; --- the definitions for the Screen Type ------------------------------------
  154. WBENCHSCREEN    EQU    $0001    ; identifies the Workbench screen
  155. PUBLICSCREEN    EQU    $0002    ; public shared (custom) screen
  156. CUSTOMSCREEN    EQU    $000F    ; for that special look
  157.  
  158. SHOWTITLE    EQU    $0010    ; this gets set by a call to ShowTitle()
  159.  
  160. BEEPING    EQU    $0020    ; set when Screen is beeping
  161.  
  162. CUSTOMBITMAP    EQU    $0040    ; if you are supplying your own BitMap
  163.  
  164. SCREENBEHIND    EQU    $0080    ; if you want your screen to open behind
  165.                 ; already open screens
  166.  
  167. SCREENQUIET    EQU    $0100    ; if you do not want Intuition to render
  168.                 ; into your screen (gadgets, title)
  169.  
  170. SCREENHIRES    EQU    $0200    ; do not use lowres gadgets (set by intuition)
  171.  
  172. STDSCREENHEIGHT    EQU    -1    ; supply in NewScreen.Height
  173. STDSCREENWIDTH    EQU    -1    ; supply in NewScreen.Width
  174.  
  175. NS_EXTENDED    EQU    $1000    ; means ns_Extenion is valid
  176. AUTOSCROLL    EQU    $4000    ; automatic scrolling of large raster
  177.  
  178. * Screen attribute tag ID's.  These are used in the ti_Tag field of
  179. * TagItem arrays passed to OpenScreenTagList() (or in the
  180. * ExtNewScreen.Extension field).
  181.  
  182. * Screen attribute tags.  Please use these versions, not those in
  183. * iobsolete.h.
  184.  
  185.  ENUM TAG_USER+33
  186. *   these items specify items equivalent to fields in NewScreen
  187.     EITEM SA_Left    ; traditional screen positions    and dimensions
  188.     EITEM SA_Top
  189.     EITEM SA_Width
  190.     EITEM SA_Height
  191.     EITEM SA_Depth    ; screen bitmap depth
  192.     EITEM SA_DetailPen    ; serves as default for windows, too
  193.     EITEM SA_BlockPen
  194.     EITEM SA_Title    ; default screen title
  195.  
  196.     EITEM SA_Colors    ; ti_Data is an array of struct ColorSpec, 
  197.             ; terminated by ColorIndex = -1.  Specifies 
  198.             ; initial screen palette colors.
  199.  
  200.     EITEM SA_ErrorCode    ; ti_Data points to LONG error code (values below)
  201.     EITEM SA_Font    ; equiv. to NewScreen.Font
  202.     EITEM SA_SysFont    ; Selects one of the preferences system fonts:
  203.             ;    0 - old DefaultFont, fixed-width
  204.             ;    1 - WB Screen preferred font
  205.  
  206.  
  207.     EITEM SA_Type    ; equiv. to NewScreen.Type
  208.     EITEM SA_BitMap    ; ti_Data is pointer to custom BitMap.  This
  209.             ; implies type of CUSTOMBITMAP    
  210.  
  211.     EITEM SA_PubName    ; presence of this tag means that the screen
  212.             ; is to be a public screen.  Please specify
  213.             ; BEFORE the two tags below
  214.  
  215.     EITEM SA_PubSig
  216.     EITEM SA_PubTask    ; Task ID and signal for being notified that
  217.             ; the last window has closed on a public screen.
  218.  
  219.  
  220.     EITEM SA_DisplayID    ; ti_Data is new extended display ID from 
  221.             ; <graphics/displayinfo.h>.
  222.  
  223.     EITEM SA_DClip    ; ti_Data points to a rectangle which defines
  224.             ; screen display clip region
  225.  
  226.     EITEM SA_Overscan    ; was S_STDDCLIP.  Set to one of the OSCAN_
  227.             ; specifiers below to get a system standard
  228.             ; overscan region for your display clip,
  229.             ; screen dimensions (unless otherwise specified),
  230.             ; and automatically centered position (partial
  231.             ; support only so far).
  232.  
  233.     EITEM SA_Obsolete1    ; obsolete S_MONITORNAME
  234.  
  235. *   booleans *
  236.     EITEM SA_ShowTitle    ; boolean equivalent to flag SHOWTITLE
  237.     EITEM SA_Behind    ; boolean equivalent to flag SCREENBEHIND
  238.     EITEM SA_Quiet    ; boolean equivalent to flag SCREENQUIET
  239.     EITEM SA_AutoScroll    ; boolean equivalent to flag AUTOSCROLL
  240.     EITEM SA_Pens    ; array as in DrawInfo, terminated by -1
  241.     EITEM SA_FullPalette ; boolean: initialize color table to entire
  242.                 ;  preferences palette (32 for V36), rather
  243.              ; than compatible pens 0-3, 17-19, with
  244.              ; remaining palette as returned by GetColorMap()
  245.  
  246.  
  247. * OpenScreen error codes, which are returned in the (optional) LONG
  248. * pointed to by ti_Data for the SA_ErrorCode tag item
  249.  
  250. OSERR_NOMONITOR    EQU    (1)    ; named monitor spec not available
  251. OSERR_NOCHIPS    EQU    (2)    ; you need newer custom chips    
  252. OSERR_NOMEM    EQU    (3)    ; couldn't get normal memory
  253. OSERR_NOCHIPMEM    EQU    (4)    ; couldn't get chipmem
  254. OSERR_PUBNOTUNIQUE    EQU (5)    ; public screen name already used
  255. OSERR_UNKNOWNMODE    EQU (6)    ; don't recognize mode asked for
  256.  
  257. ; ========================================================================
  258. ; === NewScreen ==========================================================
  259. ; ========================================================================
  260. ; NOTE: to use Extension field, you need to use ExtNewScreen, below
  261.  STRUCTURE NewScreen,0
  262.  
  263.     WORD ns_LeftEdge        ; initial Screen dimensions
  264.     WORD ns_TopEdge        ; initial Screen dimensions
  265.     WORD ns_Width        ; initial Screen dimensions
  266.     WORD ns_Height        ; initial Screen dimensions
  267.     WORD ns_Depth        ; initial Screen dimensions
  268.  
  269.     BYTE ns_DetailPen        ; default rendering pens (for Windows too)
  270.     BYTE ns_BlockPen        ; default rendering pens (for Windows too)
  271.  
  272.     WORD ns_ViewModes        ; display "modes" for this Screen
  273.  
  274.     WORD ns_Type        ; Intuition Screen Type specifier
  275.  
  276.     APTR ns_Font        ; default font for Screen and Windows
  277.  
  278.     APTR ns_DefaultTitle    ; Title when Window doesn't care
  279.  
  280.     APTR ns_Gadgets        ; UNUSED:  Leave this NULL
  281.  
  282.     ; if you are opening a CUSTOMSCREEN and already have a BitMap 
  283.     ; that you want used for your Screen, you set the flags CUSTOMBITMAP in
  284.     ; the Types variable and you set this variable to point to your BitMap
  285.     ; structure.  The structure will be copied into your Screen structure,
  286.     ; after which you may discard your own BitMap if you want
  287.     APTR ns_CustomBitMap
  288.  LABEL    ns_SIZEOF
  289.  
  290. ; For compatibility reasons, we need a new structure for extending
  291. ; NewScreen.  Use this structure is you need to use the new Extension
  292. ; field.
  293. ; NOTE WELL: this structure may be extended again in the future.
  294. ;Writing code which depends on its size is not allowed.
  295.  
  296.  STRUCTURE ExtNewScreen,ns_SIZEOF
  297.  
  298.     APTR ens_Extension        ; struct TagItem *
  299.                 ; more specification data, scanned if
  300.                 ; NS_EXTENDED is set in ns_Type
  301.  
  302.  LABEL    ens_SIZEOF
  303.  
  304. * === Overscan Types ===
  305. OSCAN_TEXT    EQU    1    ; entirely visible
  306. OSCAN_STANDARD    EQU    2    ; just past edges
  307. OSCAN_MAX    EQU    3    ; as much as possible
  308. OSCAN_VIDEO    EQU    4    ; even more than is possible
  309.  
  310.  
  311. * === Public Shared Screen Node ===
  312.  
  313. * This is the representative of a public shared screen.
  314. * This is an internal data structure, but some functions may
  315. * present a copy of it to the calling application.  In that case,
  316. * be aware that the screen pointer of the structure can NOT be
  317. * used safely, since there is no guarantee that the referenced
  318. * screen will remain open and a valid data structure.
  319.  
  320.  STRUCTURE PubScreenNode,LN_SIZE
  321.     APTR    psn_Screen    ; pointer to screen itself
  322.     UWORD    psn_Flags    ; below
  323.     WORD    psn_Size    ; includes name buffer size
  324.     WORD    psn_VisitorCount ; how many visitor windows
  325.     APTR    psn_SigTask    ; who to signal when visitors gone
  326.     UBYTE    psn_SigBit    ; which signal
  327.     UBYTE    psn_Pad1    ; word align
  328.  LABEL        psn_SIZEOF
  329.  
  330. * psn_Flags values
  331. PSNF_PRIVATE    EQU    $0001
  332.  
  333. MAXPUBSCREENNAME EQU    139    ; names no longer, please
  334.  
  335. ; pub screen modes
  336. SHANGHAI    EQU    $0001    ; put workbench windows on pub screen
  337. POPPUBSCREEN    EQU    $0002    ; pop pub screen to front when visitor opens
  338.  
  339. * Include obsolete identifiers:
  340.     IFND    INTUITION_IOBSOLETE_I
  341.     INCLUDE "intuition/iobsolete.i"
  342.     ENDC
  343.  
  344.     ENDC
  345.